import React from 'react';
import {BrowserRouter,Route} from 'react-router-dom';

import Main from '../pages/main';
import Film from '../pages/film';
import  Cinema from '../pages/cinema';
import NavBar from '../components/common/navbar';
import Detail from '../pages/main/detail';
import  Cinemater from '../pages/cinemater';
import  Login from '../pages/login';

//定义路由表
const App = ()=>(
	<BrowserRouter>
		<div>
			<div>
				<NavBar />
			</div>
			<div>
				<Route path='/' exact  component = {Main} />
				<Route path='/film' component = {Film} />
				<Route path='/cinemater' component = {Cinemater} />
				<Route path='/login' component = {Login} />
				<Route path='/cinema' component = {Cinema} />
				<Route path='/detail/:filmid' component = {Detail}/>
			</div>
		</div>
	</BrowserRouter>
)
export default App;
